package srjava.messages;

import java.io.IOException;
import java.io.StringReader;

public class AliveMsg extends Message {
	SrString serverName;
	
	public AliveMsg() {
		this.msgType = MessageType.ALIVE;
		this.serverName = new SrString();
	}

	public AliveMsg(SrString serverName) {
		this.msgType = MessageType.ALIVE;
		this.serverName = serverName;
	}

	public SrString getServerName() {
		return serverName;
	}

	public void setServerName(SrString serverName) {
		this.serverName = serverName;
	}

	@Override
	public String serialize() {
		String pom = super.serialize() + serverName.serialize();
		return pom;
	}

	@Override
	public void deSerialize(StringReader s) throws IOException {
		serverName.deSerialize(s);
	}

	
}
